Repository navigation
test(asset): fix two order/data-dependent sanity test failures - #285
Merged
Merged
Conversation
- AssetUnitTest.testPublishIncludesApiVersionHeader added api_version to the shared static Asset, leaking a third header into later tests, so testAssetGetByTypeVideo (asserts exactly 2 headers) failed in CI. Use a fresh Asset for the publish test. - AssetAPITest.testFindAssetsAllScanStatusesAreValid searched the whole list body for a status string, which fails when the first page only holds assets created before scanning was enabled (no _asset_scan_status field). Parse the list and validate the status only on assets that carry one. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
…d api_version Commit 61dd73b raised these assertions to 3 to match the api_version header leaked from testPublishIncludesApiVersionHeader through the shared static Asset. With the publish test isolated, a request carries only api_key and authorization, so assert 2 like the other AssetUnitTest cases. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
cs-raj
approved these changes
Nov 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two test-only fixes that were the last failures in the Java CMA sanity runs. No SDK source changes.
AssetUnitTest.testPublishIncludesApiVersionHeaderaddedapi_version: 3.2to the shared staticasset, so any later test reusing it saw 3 headers.testAssetGetByTypeVideoasserts exactly 2 and failed (expected: <2> but was: <3>) in the AWS-NA prod pipeline. The publish test now builds its ownAsset, liketestApiVersionHeaderScopedToPublishalready does.AssetAPITest.testFindAssetsAllScanStatusesAreValidsearched the whole list response for a status string. On dev11 the first page contains only assets created before scanning was enabled, which have no_asset_scan_status, so the check failed although nothing was wrong. It now parsesassetsand validates the status only on assets that carry one. Presence of the field on new assets is still covered by the upload, fetch and find-with-uploaded-asset tests.Verification
Full suite against a dev11 stack with these changes:
Tests run: 545, Failures: 0, Errors: 0, Skipped: 17.Not included
No changes to
pom.xml,TestClientor any credentials.🤖 Generated with Claude Code
Follow-up commit
AssetUnitTesttests (testAssetSingle,testAssetReplace,testAssetDelete,testAssetRteInformation,testAssetSetVersionName,testAssetDeleteVersionName,testAssetUnpublish,testAssetSingleFolder,testAssetCreateFolder) asserted 3 headers, a value commit 61dd73b raised to match theapi_versionheader leaked by fix 1. With the leak removed a request carriesapi_keyandauthorizationonly, so they now assert 2, consistent with the otherAssetUnitTestcases. Full suite re-run on dev11: 545 tests, 0 failures.